<script setup>

import ListingsList from "./component/listingsList.vue";
import Sift from "./component/sift.vue";
import {ref} from "vue";

const onClickLeft = () => {
  history.back()
}//导航栏返回上一个页面

// 获取查询参数
const reload = ref(true)
const params = ref({})
const getParams = (data) => {
  reload.value = !reload.value
  params.value = data.value
}
</script>

<template>
  <div style="width: 100vw ; height: 100vh ;background-color: #eeebeb">
    <div style="width: 100%; height: 150px; background-color: white">
      <van-nav-bar
          title="企业优惠"
          left-text="返回"
          left-arrow
          @click-left="onClickLeft"
          style="
        width: 100vw;
        "
      />
      <div style="width: 90%; height: 100px; background-color: #ecf6ff;position: relative;left: 5%;top: 2px">
        <van-grid column-num="3" :border="false">
          <van-grid-item>
            <van-image height="20" src="http://60.205.91.67:9001/brand/24399180.jpg" />
          </van-grid-item>
          <van-grid-item>
            <van-image height="20" src="http://60.205.91.67:9001/brand/72899481f301e62a2bf82580eeac8220.jpg" />
          </van-grid-item>
          <van-grid-item>
            <van-image height="20" src="http://60.205.91.67:9001/brand/andong.jpg" />
          </van-grid-item>
          <van-grid-item>
            <van-image height="20" src="http://60.205.91.67:9001/brand/haoshitong.jpg" />
          </van-grid-item>
          <van-grid-item>
            <van-image height="20" src="http://60.205.91.67:9001/brand/jiamingyanjing.jpg" />
          </van-grid-item>
          <van-grid-item>
            <van-image height="20" src="http://60.205.91.67:9001/brand/menliu.jpg" />
          </van-grid-item>
        </van-grid>
      </div>
      <sift @close="getParams"/>
      <listingsList :key="JSON.stringify(reload)" url="listings/selectByCityAll" :params="params"></listingsList>
    </div>
  </div>
</template>

<style scoped>
</style>